package xjggb.algorithm.优先队列;

import xjggb.algorithm.优先队列.queue.PriorityQueue;

public class Application {
    public static void main(String[] args) {


        PriorityQueue<Person> queue = new PriorityQueue<>();

        queue.enQueue(new Person("Jack", 2));
        queue.enQueue(new Person("Rose", 10));
        queue.enQueue(new Person("Jake", 5));
        queue.enQueue(new Person("James", 15));

        while (!queue.isEmpty()) {
            System.out.println(queue.deQueue());
        }

    }
}
